package com.nclg.exam.service;

import com.github.pagehelper.PageInfo;
import com.nclg.exam.dto.ExamFinishedPaperDto;
import com.nclg.exam.dto.ExamPaperDto;
import com.nclg.exam.dto.PaperHistoryDto;

import java.math.BigDecimal;

public interface ExamService {
    PageInfo<ExamPaperDto> selectExamPaperByPage(int page, int limit);

    PageInfo<PaperHistoryDto> selectExamFinishedPaperByPage(ExamFinishedPaperDto dto);

    boolean selectIsFinished(Long pId, Long uId);

    boolean insertUserPaperAndAnswer(Long pId, Long uId, BigDecimal score, String answerJson);

    String selectUserAnswer(Long upId);
}
